package cn.com.blueInfo.bpm.person.convert;

import cn.com.blueInfo.bpm.common.convert.BaseConvert;
import cn.com.blueInfo.bpm.person.entity.UserUnion;
import cn.com.blueInfo.bpm.person.request.UserUnionDTO;
import cn.com.blueInfo.bpm.person.response.UserUnionVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

/**
 * 员工联合信息表 对象转换
 * @author suxch
 * @since 2025-08-31 16:18:02
 */
@Mapper(componentModel = "spring")
public interface UserUnionConvert
        extends BaseConvert<UserUnion, UserUnionDTO, UserUnionVO> {

    UserUnion dtoToEntity(UserUnionDTO dto);

    UserUnion dtoToEntity(UserUnionDTO.UpdatePartialDTO dto);

    @Mapping(source = "status", target = "status", qualifiedByName = "enumToDesc")
    @Mapping(source = "deleted", target = "deleted", qualifiedByName = "enumToDesc")
    UserUnionVO entityToVO(UserUnion entity);

}